export default {
  border: true,
  round: true,
  align: 'center',
  loading: false,
  height: 'auto',
  loadingConfig: {
    icon: 'vxe-icon-indicator roll',
    text: '正在拼命加载中...'
  },
  rowConfig: {
    isCurrent: false,
    isHover: true,
    // 唯一键值
    keyField: 'ksh'
  },
  columnConfig: {
    resizable: true
  },
  customConfig: {
    mode: 'modal',
    storage: true
  },
  sortConfig: {
    remote: true, // 开启服务端排序
    trigger: 'cell'
  },
  toolbarConfig: {
    custom: true,
    zoom: true,
    className: 'y-toolbar-config',
    tools: [
      {
        type: 'button',
        code: 'yImportCode',
        icon: 'vxe-icon-upload',
        circle: true,
        visible: false
      },
      {
        type: 'button',
        code: 'yExportCode',
        icon: 'vxe-icon-download',
        circle: true,
        visible: false
      },
      {
        type: 'button',
        code: 'yRefreshCode',
        icon: 'vxe-icon-repeat',
        circle: true,
        visible: true
      }
    ]
  },
  radioConfig: {
    highlight: true,
    reserve: true
  },
  checkboxConfig: {
    highlight: true,
    reserve: true,
    showReserveStatus: true
  },
  pagerConfig: {
    total: 0,
    currentPage: 1,
    pageSize: 50,
    layouts: [
      'Total',
      'Sizes',
      'Home',
      'PrevPage',
      'Jump',
      'PageCount',
      'NextPage',
      'End'
    ]
  },
  seqConfig: {
    seqMethod(e) {
      const { rowIndex } = e
      const { pageSize, currentPage } = e.$grid.tablePage
      return (currentPage - 1) * pageSize + rowIndex + 1
    }
  }
}
